package cn.pomit.springbootwork.config.client.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.pomit.springbootwork.config.client.model.ResultModel;
import cn.pomit.springbootwork.config.client.service.ConfigInfoService;

@RestController
@RequestMapping("/configTest")
public class ConsulConfigRest {
	@Autowired
	ConfigInfoService configInfoService;

	@RequestMapping(value = "/locValue", method = { RequestMethod.GET })
	public ResultModel locValue() {
		return ResultModel.ok(configInfoService.locValue());
	}
	
	@RequestMapping(value = "/gitValue", method = { RequestMethod.GET })
	public ResultModel gitValue() {
		return ResultModel.ok(configInfoService.gitValue());
	}
}
